package com.lm.bootribbon.controller;

import com.lm.bootribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

    @RequestMapping("/hello")
    public String hello(@RequestParam String name){
        return helloService.hiService() + ":"+name;
    }

    @RequestMapping("/ribbon")
    public String helloAll(){
        return "hello 我是服务提供方法！";
    }
}
